package com.parkingspace.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.parkingspace.dao.PropertyBetweenUserMapper;
import com.parkingspace.entity.Property;
import com.parkingspace.entity.PropertyBetweenUser;
import com.parkingspace.entity.User;
import com.parkingspace.service.IPropertyBetweenUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 物业公司与用户表的中间表 服务实现类
 * </p>
 *
 * @author Gapper
 * @since 2021-05-24
 */
@Service
public class PropertyBetweenUserServiceImpl extends ServiceImpl<PropertyBetweenUserMapper, PropertyBetweenUser> implements IPropertyBetweenUserService {

    @Resource
    private  PropertyBetweenUserMapper pbu;


    @Override
    public List<PropertyBetweenUser> getPropertyBetweenUserList(Long pbuPropertyId) {
        System.out.println("PropertyBetweenUserImpl进来了"+pbuPropertyId);

        QueryWrapper<PropertyBetweenUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("pbu_property_id",pbuPropertyId);
        List<PropertyBetweenUser> list = pbu.selectList(queryWrapper);
        System.out.println("impl:"+list);
        return list;

    }
}

